//表单编辑布局

.form {
  padding: $baseWid;
//   display: none;
  width: 100%;
  font-size: 12px;
  .icon-yincang {
    &.close {
      &:before {
        content: '\e6d8';
      }
    }

  }
  .icon-feedback_fill {
    color: #aaa;
    font-size: 18px;
    margin-left: 5px;
  }
  .icon-addition_fill {
    color: $blue;
    font-size: 22px;
  }
  .icon-offline_fill {
    color: #ff6969;
    font-size: 22px;
  }
  .icon-stealth_fill {
    font-size: 22px;
    color: $orange;
  }
  label {
    line-height: 28px;
    position: relative;
  }
  .sub-label {
    font-size: 12px;
  }
  .line {
    margin-bottom: 5px;
  }
  .error {
    text-align: right;
    color: #f00;
    font-size: 12px;
  }
  .input-text {
    line-height: 32px;
    height: 32px;
    padding: 0 5px;
    border: $border-style;
    &:focus {
      border-color: $primary-color;
    }
  }
  .input-text-error {
    border-color: $error !important;
    color: $error;
  }
  .input-textarea {
    position: relative;
    @include clearfix();
    padding: 10px;
    border: $border-style;
    textarea {
      display: block;
      width: 100%;
      //margin: 10px auto;
      min-height: 80px;
      border: 0;
      resize: none;
    }
    .tip {
      margin-top: 5px;
      float: right;
    }

    &.focus {
      border-color: $primary-color;
    }

  }
  .input-checkbox {
    @include inline-block();
    position: relative;
    width: 20px;
    height: 32px;
    line-height: 30px;
    vertical-align: middle;
    text-align: center;
    input {
      position: relative;
      z-index: 1;
      @include opacity(0);
      &:checked {
        & + .icon-square {
          color: $blue;
          &:before {
            content: '\e6d4';
          }
        }
      }
    }
    .icon-square {
      left: 0;
      top: 0;
      position: absolute;
      z-index: 0;
    }
    &.checked {
      .icon-square {
        color: $blue;
        &:before {
          content: '\e6d4';
        }
      }
    }
  }
  .input-radio {
    @include inline-block();
    position: relative;
    width: 16px;
    height: 30px;
    line-height: 30px;
    //border: 1px solid #ffff00;
    vertical-align: middle;
    text-align: center;
    input {
      position: relative;
      z-index: 1;
      @include opacity(0);
      &:checked {
        & + .new-input {
          background-position: -40px -242px;
        }
        & + .icon-danxuan {
          &:before {
            content: '\e646';
          }
        }
      }
    }
    .icon-danxuan {
      left: 0;
      top: -2px;
      width: 100%;
      height: 100%;
      position: absolute;
      z-index: 0;
    }
    .new-input {
      content: '';
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      position: absolute;
      z-index: 0;
     // background: url("images/spr-l-0626.png") 2px -240px no-repeat;
      @include bgurl('spr-l-0626.png');
      background-position: 2px -240px;
    }
    &.checked {
      .icon-danxuan {
        &:before {
          content: '\e646';
        }
      }
      .new-input {
        background-position: -40px -242px;
      }
    }
  }
  &.on {
    display: block;
  }
}
.form-layouts{
  .form-folder{
    .line-ck{
      .input-text{
        margin-top: 5px;
        width: 60%;
      }
    }
  }
}
.form-block-line {
  margin-bottom: 8px;
  border: $border-style;
  position: relative;
  .ico-triangle {
    position: absolute;
    top: 5px;
    left: -14px;
  }

}

.form-block {
  margin-bottom: 8px;
  .input-text {
    display: block;
    width: 100%;
  }
}

.form-folder {
  border: $border-style;
  padding: 5px 15px 5px 25px;
  label {
    position: relative;
    display: block;
    margin: 5px 0;
    &:before {
      @include triangle(top, #666, 5px, 5px);
      position: absolute;
      top: 10px;
      left: -15px;
      content: '';
    }
  }
  p {
    margin-bottom: 5px;
  }
  .com-btn {
    min-width: 70px;
    margin: 0 5px;
    line-height: 28px;
  }

  @include respond-to(lg) {
    padding: 5px 10px 5px 20px;
    .com-btn {
      min-width: 55px;
    }
  }

}

.form-group, .form-folder {
  margin-bottom: 8px;
  .line-ck {
    margin-bottom: 5px;
    .input-text {
      width: calc(100% - 130px);
      display: inline-block;
    }
  }
  .line-ck2 {
    margin-bottom: 5px;
    .input-text {
      width: calc(100% - 60px);
    }
  }
  .line-ck3 {
    margin-bottom: 5px;
    .input-text {
      font-size: 12px;
      width: calc(100% - 100px);
    }
  }

  @include respond-to(lg) {
    .line-ck3 {
      .input-text {
        width: calc(100% - 80px);
      }
    }
  }
}

.form-block-checkbox {
  font-size: 0;
  .com-btn-reversal {
    font-size: 14px;
    border: $border-style;
    padding: 0;
    width: 55px;
    min-width: 0;
    color: #666;
    border-radius: 0;
    margin: 0;
    &:hover,
    &.on {
      background: $primary-color;
      color: #fff;
    }
  }
}

.form-block-radius-checkbox {
  .com-btn {
    padding: 0;
    margin-left: 8px;
    min-width: 0;
    width: 70px;
    &:first-child {
      margin-left: 0;
    }
    &:hover,
    &.on {
      background: $primary-color;
      color: #fff;
    }
  }
  @include respond-to(lg) {
    .com-btn {
      width: 60px;
      margin-left: 5px;
    }

  }
}

.form-colorpicker {
  display: inline-block;
  width: 49px;
  height: 33px;
  border: $border-style;
  vertical-align: middle;
  margin-right: 10px;
}

.form-inline-tips {
  font-size: 12px;
  color: #999;
  vertical-align: middle;
}

.form-error-tips {
  text-align: right;
  margin-top: 5px;
  font-size: 12px;
  color: #f00;
}

.form-sections {
  .form-section {
    @include inline-block();
    position: relative;
    vertical-align: middle;
  }
  .form-cascader {
    border: $border-style;
    width: 48%;
    height: 140px;
    float: left;
    margin: 0 1%;
    &:first-child {
      margin-left: 0;
    }
    a {
      @extend %ellipsis-basic;
      padding: 0 14px;
      display: block;
      font-size: 14px;
      color: #666;
      line-height: 34px;
      border-bottom: 1px solid transparent;
      &:hover,
      &.on {
        border-bottom-color: #e5e5e5;
        background: #dbf1ff;
      }
    }
  }
  .section-main {
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background: #fff;
    width: 350px;
    position: fixed;
    right: 0;
    top: 0px;
    display: none;
    z-index: 10;
    &:before {
      content: '';
      width: 24px;
      height: 12px;
      position: absolute;
      top: -12px;
      right: 30px;
      z-index: 0;
      @include bgurl('sjt-2.png');
    }
    footer {
      padding-top: 10px;
    }
    header {
      color: $blue;
      font-size: 14px;
      text-align: left;
      border-bottom: 1px solid $blue;
      line-height: 32px;
      padding-bottom: 5px;
    }
    table {
      width: 100%;
      td, th {
        border: $border-style;
      }
      th {
        line-height: 32px;
        background: #f5f5f5;
      }
      .input-text {
        border: 0;
      }
    }
    .input-text {
      width: 100%;
    }
    .cnt {
      max-height: 250px;
      overflow-y: auto;
    }
    .input-texts {
      margin: 5px 0;
      border-top: $border-style;
      .input-text {
        border-top: 0px;
      }
    }
    .com-btn {
      line-height: 24px;
      border-radius: 0;
    }
    .close {
      position: absolute;
      font-size: 24px;
      right: 30px;
      top: 5px;
      z-index: 11;
      color: #999;
      text-decoration: none;
      &:before {
        content: '×';
      }
      &:hover {
        color: $blue;
      }
    }
    .tip {
      color: #999;
      font-size: 12px;
      padding: 10px 0;
    }

    &.on {
      display: block;
    }
  }
  .section-link {
    font-size: 12px;
    color: $blue;
  }
  .split {
    margin: 0 2px;
    color: $primary-color;
    font-size: 12px;
    @include inline-block();
    position: relative;
    vertical-align: middle;

  }
}

.form-m-table-firts-col {
  width: 25%;
  position: absolute;
  left: 0;
  top: 52px;
  p {
    padding: 0 5px;
    height: 31px;
    line-height: 31px;
    border-bottom: $border-style;
    background: #fff;
  }
}

.form-m-table {
  background: #fff;
  table {
    font-size: 12px;
    text-align: center;
    width: 100%;
  }
  .table-header {
    padding-right: 6px;
    background: #f8f8f8;
    overflow: hidden;
    th {
      border-top: 0;
      border-bottom: 0;
    }
  }
  .col1 {
    min-width: 225px;
  }
  .col2 {
    min-width: 90px;
  }
  .col3 {
    min-width: 90px;
  }
  .col4 {
    min-width: 225px;
  }
  .col5 {
    min-width: 270px;
  }
  .table-wrapper {
    overflow-y: scroll;
    overflow-x: auto;
    height: 140px;
  }
  thead {
    background: #f8f8f8;
    color: #999;
  }
  th {
    border: $border-style;
    font-weight: normal;
    height: 50px;
    &:last-child {
      border-right: 0;
    }
  }
  td {
    border: $border-style;
    padding: 0 5px;
    color: #333;
    line-height: 30px;
  }
  .test {
    color: #ff6900;
  }
  .pass {
    color: #34b26d;
  }
  .ctrl-btns {
    a {
      display: inline-block;
      min-width: 30px;
      padding: 0 10px;
      height: 22px;
      border: 1px solid #c4e9f7;
      background: #eff6f9;
      text-align: center;
      line-height: 22px;
      border-radius: 11px;
      color: $primary-color;
      margin: 0 5px;
    }
  }
}

.form-m-search-box {
  height: 58px;
  padding: 10px 0 0 13px;
  background: #f7fcff;
  border: $border-style;
  margin-bottom: 27px;
  input {
    width: 178px;
    padding: 0 10px;
    height: 28px;
    border: $border-style;
    outline: none;
    font-size: 12px;
    color: #333;
  }
  .search-btn {
    width: 100px;
    height: 32px;
    font-size: 14px;
    margin-left: 12px;
    padding: 0;
  }
  select {
    width: 100px;
    height: 28px;
    border: $border-style;
  }
}

.form-m-search-type {
  .com-search {
    input {
      border: 0;
      border-bottom: $border-style;
    }
  }
}

.form-m-tree {
  padding: 10px;
  li {
    list-style: none;
    a {
      position: relative;
      font-size: 12px;
      color: #333;
      margin-bottom: 12px;
      display: block;
      cursor: pointer;
    }
  }
  .level0 {
    &:focus {
      outline: none;
      border: none;
    }
    & > a {
      padding-left: 24px;
      &:before {
        content: '';
        position: absolute;
        width: 14px;
        height: 14px;
        @include bgurl('sprites-icon.png');
        background-position: -8px -10px;
        left: 4px;
        top: 3px;
      }
    }
  }
  ul.level0 {
    position: relative;
    &:before {
      position: absolute;
      top: -6px;
      bottom: 6px;
      left: 10px;
      border-left: 1px solid #d5d5d5;
      content: '';
    }
  }
  .level1 {
    &:focus {
      outline: none;
      border: none;
    }
    & > a {
      padding-left: 50px;
      &:before {
        content: '';
        position: absolute;
        width: 15px;
        height: 18px;
        @include bgurl('sprites-icon.png');
        background-position:  -38px -6px;
        left: 27px;
        top: 0;
      }
      &:after {
        content: '';
        position: absolute;
        left: 11px;
        top: 11px;
        height: 0;
        width: 8px;
        border-top: 1px solid #d5d5d5;
      }
    }
  }
}

.from-table-cnt {
  width: 100%;
  height: 100%;
  font-size: 12px;
  table {
    min-width: 100%;
    text-align: center;
    thead {
      background: #f8f8f8;
      overflow: hidden;
      th {
        border: $border-style;
        line-height: 55px;
      }
    }
    tbody {
      td {
        background: #fff;
        border: $border-style;
        padding: 5px 10px;
        line-height: 28px;
        color: #333;
      }
      .firstCol {
        text-align: left;
        padding-left: 2em;
      }
    }
  }
  .col-md {
    width: 140px !important;
  }
  .firstCol {
    width: 300px !important;
  }
  .ctrl-btns {
    a {
      display: inline-block;
      min-width: 30px;
      padding: 0 10px;
      height: 22px;
      border: 1px solid #c4e9f7;
      background: #eff6f9;
      text-align: center;
      line-height: 22px;
      border-radius: 11px;
      color: $primary-color;
      margin: 0 5px;
    }
  }
  .fht-thead {
    background: #f8f8f8;
  }
  .fht-table-wrapper {
    overflow-x: auto;
  }
  //固定列头
  .fht-fixed-body {
    width: 100% !important;
    overflow: hidden;
    .fht-tbody {
      min-height: 100% !important;
    }
  }
  //固定侧咧
  .fht-fixed-column {
    width: 300px !important;
    z-index: 99;
    .fht-thead {
      position: relative;
      z-index: 100;
      border-right: $border-style;

    }
  }
  @include respond-to(lg) {
    #from-table {
      min-width: 1000px;
    }
  }

}